package com.ybkj.daijia.server.service;

import com.ybkj.daijia.page.Page;
import com.ybkj.daijia.server.model.Car;
import com.ybkj.daijia.server.model.Car.TransmissionCase;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author Shine
 */
public interface CarService {

    /**
     * 分页查询
     *
     * @param keyWords
     * @return
     */
    public Page<Car> findCarResult(String keyWords);

    /**
     * 分页查询
     *
     * @param keyWords
     * @return
     */
    public Page<Car> queryAll(String keyWords);

    /**
     * 新增汽车信息
     *
     * @param Car
     * @return
     */
    public Car insertRecord(Car car);

    /**
     * 根据车牌号查询
     *
     * @param number
     * @return Car
     */
    public Car findByNumber(String carNumber);

    public List<Car> findByNumberLike(String carNumber);    //模糊查询车牌号

    public List<Car> findByParams(Long companyId, Long brandId,
        Long brandTypeId);    //根据所属公司,品牌,品牌型号查询

    public Car findById(Long id);

    public List<Car> findALL();

    public int delete(Car car);

    public int deleteCarType(Long carTypeId);        //删除汽车类型

    public int deleteBrand(Long brandId);            //删除品牌

    public int deleteBrandType(Long brandTypeId);    //删除品牌型号

    /**
     * 根据主键更新司机基本信息
     *
     * @param record
     * @return
     */
    public int updateByPrimaryKey(Car record);

    public Page<Map<String, Object>> findAllWithParam(String city, BigDecimal max, BigDecimal min,
        Long brandId, Long[] array, String sequenceStr,
        TransmissionCase transmissionStr, Integer page, Integer limit);

    public Long countCarByTypeId(Long typeId);


}

